(function () {
    'use strict';
    angular.module('cf-content')
            .config(['$stateProvider', 'RouteHelpersProvider', function ($stateProvider, helper) {
                    $stateProvider
                            .state('home', {
                                url: '/home',
                                abstract: true,
                                template: '<shop-home></shop-home>',
                                resolve: helper.resolveFor('icons'),
                                link: function (scope, element, attrs, ngModel) {
                                    scope.fixed = true;
                                    scope.$on('ngFinished', function () {
                                        $timeout(function () {
                                            console.log(document.body.clientHeight, $window.innerHeight)
                                            if (document.body.clientHeight + 85 > $window.innerHeight)
                                                scope.fixed = false;
                                            else
                                                scope.fixed = true;
                                        }, 300, true)
                                    });
                                }
                            });
                }])
})();